<template>
	<view class="system">
		<u-cell-group :border="false">
			<u-cell-item title="修改手机号" value="15896932156" @tap="editPhone" v-if="false"></u-cell-item>
			<u-cell-item title="修改密码" @click="editPassword" v-if="false"></u-cell-item>
			<u-cell-item title="版本号" :value="version"></u-cell-item>
		</u-cell-group>
		
		<u-button type="error" class="btn" @click="signOut">退出登录</u-button>
	</view>
</template>

<script>
	var util = require('../../common/util.js');
	export default {
		data() {
			return {
				version: "1.0.1",
				use_scene:util.getCurrentSecene()
			}
		},
		onLoad() {
			// #ifdef APP-PLUS
			this.version = plus.runtime.version;
			// #endif
		},
		methods: {
			editPhone () {
				uni.navigateTo({
					url: '/pages/my/editPhone'
				})
			},
			editPassword () {
				uni.navigateTo({
					url: '/pages/my/editPassword'
				})
			},
			signOut () {
				uni.showModal({
					title: '退出账号',
					content: '确认退出当前账号？',
					success: function (res) {
						if (res.confirm) {
							uni.removeStorageSync("xixuan_pintuan_token");
							uni.removeStorageSync("xixuan_pintuan_phone");
							uni.redirectTo({
								url:"/pages/login/common_login"
							});
						}
					}
				})
			}
		}
	}
</script>

<style scoped>
.system {
	background-color: var(--bgColor);
	min-height: 100%;
}
.btn {
	background: var(--btnBgColor);
	color: #FFFFFF;
	margin: 40rpx 24rpx 0;
}
</style>
